<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

class public_controller extends MY_Controller
{
    public $view_data = array();
    public $view_path_name;

    public function __construct()
    {
        parent::__construct();
    }

    public function load_view($view_path_name)
    {
        $generated_news_type = array(
            array(
                'text' => lang('news_all'),
                'href' => base_url().lang('link_news').'/'.lang('link_news_all')
            ),
            array(
                'text' => lang('generated_news_stock'),
                'href' => base_url().lang('link_news').'/'.lang('link_news_stock')
            ),
            array(
                'text' => lang('generated_news_business'),
                'href' => base_url().lang('link_news').'/'.lang('link_news_business')
            ),
            array(
                'text' => lang('generated_news_finance'),
                'href' => base_url().lang('link_news').'/'.lang('link_news_finance')
            ),
            array(
                'text' => lang('generated_news_economy'),
                'href' => base_url().lang('link_news').'/'.lang('link_news_economy')
            ),
            array(
                'text' => lang('generated_news_vinawealth_essentials'),
                'href' => base_url().lang('link_news').'/'.lang('link_news_vinawealth_essentials')
            )
        );

        $this->view_path_name = $view_path_name;
        $this->view_data['generated_news_type'] = $generated_news_type;
        $this->view_data['meta_title'] = $this->get_site_title();
        $this->view_data['meta_description'] = $this->get_meta_description();
        $this->view_data['menu_code'] = $this->get_menu_code();
        $this->view_data['english_link'] = $this->get_english_link();
        $this->view_data['vietnam_link'] = $this->get_vietnam_link();
        $this->view_data['current_lang'] = $this->get_current_language();
        $this->view_data['slideshow_images'] = $this->get_slideshow_images();
        $this->view_data['theme_path'] = base_url();
        $this->load->view('MasterPage/header', $this->view_data);
        $this->load_content_view();
        $this->load->view('MasterPage/footer', $this->view_data);
    }

    public function load_content_view()
    {
        $this->load->view($this->view_path_name,$this->view_data);
    }

    public function get_site_title()
    {
        return 'Escape Check in';
    }

    public function get_meta_description()
    {
        return '' ;
    }

    public function get_menu_code()
    {
        return '';
    }

    public function get_slideshow_images()
    {
        $result = array();
        $result[] = '/images/layout/home_talent.jpg';
        return $result;
    }

    public function get_english_link()
    {
        return '#';
    }

    public function get_vietnam_link()
    {
        return '#';
    }
}